#include <boost/dynamic_bitset.hpp>
#include <iostream>

int main()
{
	boost::dynamic_bitset<> bitset(3,4); //*3 bits, initialized with 100b
	bitset.push_back(true);

	std::cout << bitset.size() << std::endl; //*return the number of bits
	std::cout << bitset.count() << std::endl; //*return the number of bits currently set
	std::cout << bitset.any() << std::endl; //*return if any bit is true
	std::cout << bitset.none() << std::endl; //*return if none of the bits is true

	std::cout << bitset[0].flip() << std::endl; //*access the least significant bit and flip it: 1
	std::cout << bitset[0].flip() << std::endl; //*access the least significant bit and flip it: 0
	std::cout << ~bitset[0] << std::endl; //* inverse but not change bitset[0] :1
	std::cout << ~bitset[0] << std::endl; //* inverse but not change bitset[0] :1

	std::cout << std::hex << bitset << std::endl; //*print bits warning C4244: 'initializing' : conversion from 'std::streamsize' to 'size_t', possible loss of data
}